// @ts-nocheck
import React from 'react';
import { ApplyPluginsType, dynamic } from '/Users/moxue/Develop/Me/go-gin-template-web/node_modules/@umijs/runtime';
import * as umiExports from './umiExports';
import { plugin } from './plugin';
import LoadingComponent from '@/components/PageLoading/index';

export function getRoutes() {
  const routes = [
  {
    "path": "/",
    "component": dynamic({ loader: () => import(/* webpackChunkName: 'layouts__BlankLayout' */'/Users/moxue/Develop/Me/go-gin-template-web/src/layouts/BlankLayout'), loading: LoadingComponent}),
    "routes": [
      {
        "path": "/user",
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'layouts__UserLayout' */'/Users/moxue/Develop/Me/go-gin-template-web/src/layouts/UserLayout'), loading: LoadingComponent}),
        "routes": [
          {
            "name": "login",
            "path": "/user/login",
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__user__Login' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/user/Login'), loading: LoadingComponent}),
            "exact": true
          }
        ]
      },
      {
        "path": "/",
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'layouts__SecurityLayout' */'/Users/moxue/Develop/Me/go-gin-template-web/src/layouts/SecurityLayout'), loading: LoadingComponent}),
        "routes": [
          {
            "path": "/",
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'layouts__BasicLayout' */'/Users/moxue/Develop/Me/go-gin-template-web/src/layouts/BasicLayout'), loading: LoadingComponent}),
            "authority": [
              "admin",
              "user"
            ],
            "routes": [
              {
                "path": "/",
                "redirect": "/usermanage/list",
                "exact": true
              },
              {
                "name": "用户管理",
                "icon": "smile",
                "path": "/usermanage",
                "routes": [
                  {
                    "name": "列表",
                    "icon": "smile",
                    "path": "/usermanage/list",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__usermanage__List' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/usermanage/List'), loading: LoadingComponent}),
                    "exact": true
                  }
                ]
              },
              {
                "name": "图表",
                "icon": "smile",
                "path": "/chart",
                "routes": [
                  {
                    "name": "demo1",
                    "path": "/chart/demo1",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__chart__Demo1' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/chart/Demo1'), loading: LoadingComponent}),
                    "exact": true
                  },
                  {
                    "name": "demo2",
                    "path": "/chart/demo2",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__chart__Demo2' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/chart/Demo2'), loading: LoadingComponent}),
                    "exact": true
                  },
                  {
                    "name": "demo3",
                    "path": "/chart/demo3",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__chart__Demo3' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/chart/Demo3'), loading: LoadingComponent}),
                    "exact": true
                  }
                ]
              },
              {
                "name": "布局管理器",
                "icon": "smile",
                "path": "/grid",
                "routes": [
                  {
                    "name": "demo1",
                    "path": "/grid/demo1",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__grid__Demo1' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/grid/Demo1'), loading: LoadingComponent}),
                    "exact": true
                  }
                ]
              },
              {
                "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__404' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/404'), loading: LoadingComponent}),
                "exact": true
              }
            ]
          },
          {
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__404' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/404'), loading: LoadingComponent}),
            "exact": true
          }
        ]
      }
    ]
  },
  {
    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__404' */'/Users/moxue/Develop/Me/go-gin-template-web/src/pages/404'), loading: LoadingComponent}),
    "exact": true
  }
];

  // allow user to extend routes
  plugin.applyPlugins({
    key: 'patchRoutes',
    type: ApplyPluginsType.event,
    args: { routes },
  });

  return routes;
}
